<template>
    <div style="height: 100vh; width: 100vw;">
        <iframe :src="iframeSrc"  scrolling="no" frameborder="0" marginheight="0" marginwidth="0"></iframe>
    </div>
</template>

<script>
import { scrollMixin } from "utils/mixin";
import { Toast } from "vant";
export default {
  mixins: [scrollMixin], //加载更多
  data() {
    return {
      iframeSrc:''
    };
  },
  activated() {
    let i = this.fun.getKeyByI();
    let mid = this.fun.getKeyByMid();
    let type = this.fun.getTyep();
    let shop_id = this.fun.getKeyByMicroShopId();
    let uuid = window.localStorage.uuid;
    let query = this.$route.query;
    let params = "";
    let baseUrl = "/addons/yun_shop/api.php?i=" + i + "&uuid=" + uuid + "&type=" + type;
    if (mid) {
      baseUrl += "&mid=" + mid;
    }
    if (shop_id) {
      baseUrl += "&shop_id=" + shop_id;
    }
    for (const key in query) {
      params += '&'+key+'='+query[key]
    }
    this.iframeSrc = this.fun.getSiteRoot() + baseUrl + '&route='+this.$route.params.url + params;
    console.log(this.iframeSrc)
  }
};
</script>
<style lang="scss" rel="stylesheet/scss" scoped>
iframe {
  width: 100%;
  height: 100%;
  display: block;
}
</style>
